package cn.sc.summer.calculate.job;

import cn.sc.summer.calculate.annotation.JobExecution;
import cn.sc.summer.calculate.service.ScoreService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.DisallowConcurrentExecution;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 类名：刷新微服务在线设备分数定时任务
 *
 * @author a-xin
 * @date 2024/2/4 14:42
 */
@Slf4j
@Component
@DisallowConcurrentExecution
@JobExecution("刷新微服务在线设备分数")
public class RefreshServerScoreJob implements Job {

    @Resource
    private ScoreService scoreService;

    @Override
    public void execute(JobExecutionContext jobExecutionContext) {
        scoreService.refreshServerScore();
    }

}
